package com.jake.spring.cloud.kafka.stomp2.service;

import com.jake.spring.cloud.kafka.stomp2.constant.AllConstants;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.messaging.simp.SimpMessagingTemplate;
import org.springframework.stereotype.Service;

@Service
public class WebSocketService {

    @Autowired
    private SimpMessagingTemplate simpMessagingTemplate;

    public void push(String msg) {
        simpMessagingTemplate.convertAndSend(AllConstants.WEBSOCKET_DESTINATION, msg);
    }

}
